package com.springioc.component;

import com.springioc.model.UserInfo;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
@Component
public class UserComponent {
//    public void SayHi() {
//       System.out.println("Hi,component");
//    }
    @Bean("1")
    public UserInfo userInfo() {
        return new UserInfo(1,"zhangsan");
    }

    @Bean("2")
    public UserInfo userInfo2() {
        return new UserInfo(2,"lisi");
    }
}
